package com.certification.common.utils;

import org.apache.commons.lang3.RandomUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author copa
 * @createDate 2022-03-31 16:31
 * @function
 */
public class TimeUtils {

    public static String fileTimeName() {
        SimpleDateFormat ft = new SimpleDateFormat("yyyyMMddHHmmssSS");
        String finalName = ft.format(new Date()) + RandomUtils.nextInt();
        return finalName;
    }

    public static void main(String[] args) {
        String a = "qq图片.png";
        System.out.println(a.substring(a.lastIndexOf(".") + 1));
    }
}
